﻿<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
	<!-- 包含公共的JSP代码片段 -->

	<title>餐馆王平台</title>


	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<script type="text/javascript" src="${applicationScope.backendFolder}/js/jquery.js"></script>
	<script type="text/javascript" src="${applicationScope.backendFolder}/js/page_common.js"></script>
	<link href="${applicationScope.backendFolder}/css/common_style_blue.css" rel="stylesheet" type="text/css">
	<link rel="stylesheet" type="text/css" href="${applicationScope.backendFolder}/css/index_1.css" />
</head>
<body>
<!-- 页面标题 -->
<div id="TitleArea">
	<div id="TitleArea_Head"></div>
	<div id="TitleArea_Title">
		<div id="TitleArea_Title_Content">
			<img border="0" width="13" height="13" src="../style/images/title_arrow.gif"/> 餐桌列表
		</div>
	</div>
	<div id="TitleArea_End"></div>
</div>


<!-- 过滤条件 -->
<div id="QueryArea">
	<form action="${pageContext.request.contextPath}/table" method="get">
		<input type="hidden" name="method" value="list">
		<input type="text" name="keyword" title="请输入餐桌名称" value="${requestScope.keyword}">
		<input type="submit" value="搜索">
	</form>
</div>


<!-- 主内容区域（数据列表或表单显示） -->
<div id="MainArea">
	<table class="MainArea_Content" cellspacing="0" cellpadding="0">
		<!-- 表头-->
		<thead>
		<tr align="center" valign="middle" id="TableTitle">
			<td>编号</td>
			<td>桌名</td>
			<td>状态</td>
			<td>预定时间</td>
			<td>操作</td>
		</tr>
		</thead>
		<!--显示数据列表 -->
		<tbody id="TableData">
		<c:forEach items="${requestScope.tables}" var="table">
			<tr class="TableDetail1">
				<td align="center">${table.tableId}&nbsp;</td>
				<td align="center"> ${table.tableName}&nbsp;</td>
				<td align="center"><c:if test="${table.tableStatus==1}">已预定</c:if>
					<c:if test="${table.tableStatus==0}">空闲状态</c:if></td>

				<td align="center">${table.reserVationTime}</td>
				<td>
					<c:if test="${table.tableStatus==1}">
						<a href="${pageContext.request.contextPath}/table?method=update&tableId=${table.tableId}&tableStatus=${table.tableStatus}" class="FunctionButton">退桌</a>
					</c:if>
					<c:if test="${table.tableStatus==0}">
						<a href="${pageContext.request.contextPath}/table?method=update&tableId=${table.tableId}&tableStatus=${table.tableStatus}" class="FunctionButton">订桌</a>
					</c:if>
					<a href="${pageContext.request.contextPath}/table?method=delete&tableId=${table.tableId}&${table.tableStatus}" onClick="return delConfirm();"class="FunctionButton">删除</a>
				</td>
			</tr>
		</c:forEach>

		</tbody>
	</table>

	<!-- 其他功能超链接 -->
	<div id="TableTail" align="center">
		<div class="FunctionButton"><a href="${applicationScope.backendDetailFolder}/table/table-save.jsp">添加</a></div>
	</div>
</div>
</body>
</html>
